<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@include file="/pages/inc/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>邮箱注册</title>
<script type="text/javascript" src="${contextPath}/static/jquery-3.2.0.min.js"></script>
<script type="text/javascript">
	function register(){
		var email = $("input[name='email']").val();
		var passwd = $("input[name='passwd']").val();
		var nickName = $("input[name=nickName]").val();
		var imgFile = $("input[name='imgFile']").val();
		if(email ==''){
			alert("请输入邮箱");
			return false;
		}
		if(passwd ==''){
			alert("请输入密码");
			return false;
		}
		if(imgFile ==''){
			alert("请输入头像");
			return false;
		}
		$("#frm").submit();
	}
</script>
</head>
<body>
	<br><br><br><br><br>
	<form action="${contextPath}/userAccount/emailRegister" id="frm" method="post" enctype="multipart/form-data">
		<table align="center">
			<tr>
				<td>email:</td>
				<td><input type="text" name="email"></td>
			</tr>
			<tr>
				<td>passwd:</td>
				<td><input type="password" name="passwd"></td>
			</tr>
			<tr>
				<td>nickName</td>
				<td><input type="text" name="nickName">
			</tr>
			<tr>
				<td>头像：</td>
				<td><input type="file" name="imgFile"></td>
			</tr>
			<tr>
				<td>gender:</td>
				<td><input type="radio" name="gender" value="0" checked>女
					<input type="radio" name="gender" value="1">男
				</td>
					
			</tr>
			<tr>
				<td colspan="2" align="center">
					<input type="button" value="注册" onclick="register()">
					
				</td>
			</tr>
		</table>
	</form>
</body>
</html>